package com.lovo.sgproj.service.imp;

import com.lovo.sgproj.bean.UserBean;
import com.lovo.sgproj.dao.UserDAO;
import com.lovo.sgproj.dao.imp.UserDAOImp;
import com.lovo.sgproj.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserServiceImp implements UserService {
    @Autowired
    UserDAO userDAO;

    @Override
    public boolean login(String username, String password) {
        UserBean theUser = userDAO.getUserByNamePwd(username, password);
        if (theUser != null) {
            return true;
        }
        return false;
    }
}
